package com.example.caiyu.Mapper;

import com.example.caiyu.Pojo.Commodity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

@Mapper
public interface CommodityManagerMapper {
    @Select("select count(*) from caiyu.commodity")
    public Integer getCommodityCount();
    @Insert("INSERT INTO caiyu.commodity (commodity_id, name, price, category, images, commodity_status, score) VALUES (#{commodityId}, #{name}, #{price}, #{category}, #{images}, #{commodityStatus}, #{score})")
    public void publishCommodity(Commodity commodity);
}
